
<?php
if($user->is_admin()) $title = 'Administratora';
else if($user->is_leader()) $title = 'Starosty';
else $title = 'Studenta';
?>


<h3>Panel <?php echo $title; ?></h3>
<div class="list-group">
    <?php
    if($user->is_admin()){
        ?>
        <a href="study_courses.php" class="list-group-item">Kierunki studiów</a>
        <a href="logout.php" class="list-group-item">Wyloguj</a>
    <?php
    }
    else{
    ?>

        <a href="main.php" class="list-group-item">Aktualności</a>
        <a href="classes.php" class="list-group-item">Zapisy</a>

        <?php
            if($user->is_leader()){
                ?>
                    <a href="subjects.php" class="list-group-item">Przedmioty</a>
                    <a href="rooms.php" class="list-group-item">Sale</a>
                    <a href="teachers.php" class="list-group-item">Prowadzący</a>
                    <a href="students.php" class="list-group-item">Studenci</a>
                <?php
            }
        ?>
        <a href="logout.php" class="list-group-item">Wyloguj</a>
    <?php
    }
    ?>
</div>